<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<c:set var="language" value="${not empty param.language ? param.language : not empty language ? language : pageContext.request.locale}" scope="session" />
<fmt:setLocale value="${language}" />
<fmt:setBundle basename="properties.text" />

<link rel="stylesheet" type="text/css" href="/jt-hr-WEB/css/styles.css">
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title><fmt:message key="welcome" /></title>

</head>
<body>
	<form >
            <select id="language" name="language" onchange="submit()">
                <option value="en" ${language == 'en' ? 'selected' : ''}>English</option>
                <option value="de" ${language == 'de' ? 'selected' : ''}>Deutsch</option>
                <option value="ro" ${language == 'ro' ? 'selected' : ''}>Romana</option>
            </select>
    </form>
	<div id="header">
	    <div id="img">
        	<img class="center" src="/jt-hr-WEB/img/msg_header.jpg" height="100px" width="500px"/>    
    		<jsp:include page="/SharedPages/SharedPage.jsp"></jsp:include>
    	</div>
    </div>
    <div class="content">
		<div id="wrapper">
			<ul>
				<li><a id="button" class="director" href="/jt-hr-WEB/userPages/userServlet"><fmt:message key="userOperations" /></a></li>
				<li><a id="button" class="director" href="/jt-hr-WEB/candidate/displayCandidate"><fmt:message key="candidateOperations" /></a></li>
				<li><a id="button" class="director" href="/jt-hr-WEB/positionPages/PositionServiceServlet"><fmt:message key="positionOperations" /></a></li>
			</ul>
		</div> 
	</div>
<script>
	var lang='<c:out value="${language}"/>';
	select=document.getElementById("language");
	if(lang=="de_DE"||lang=="de"){
		select.options[1].defaultSelected=true;
	}
	else if(lang=="ro_RO"||lang=="ro"){
		select.options[2].defaultSelected=true;
	}
	else {
		select.options[0].defaultSelected=true;
	}

	
</script>
</body>
</html>